package middleware

import (
	"git.mycaigou.com/gfyx/micro-gfyx-mp-api/infrastructure/common/constants"
	"github.com/gin-gonic/gin"
)

func LimitIP() gin.HandlerFunc {
	return func(c *gin.Context) {
		// todo 实现限流，目前先记录 client ip 和 service ip
		c.Set(constants.Device, constants.FromDeviceClueMini)
		c.Set(constants.ClientIp, c.ClientIP())
		c.Next()
	}
}
